import React, {Component} from 'react';

import {Divider, Layout} from "antd";
import { Switch, Route, Redirect} from 'react-router-dom'

import Home from "../Home/home";
import Home_left from "../Home/home_left";
import Home_right from "../Home/home_right";
import Registrate from "../Registrate/registrate";
import Registrate_left from "../Registrate/registrate_left";
import Registrate_right from "../Registrate/registrate_right";

const { Sider, Content } = Layout;

class Start extends Component {
  render() {
    return (
      <Layout>
        {/*左侧部分*/}
        <Sider width={380} style={{ background:'#29282c' }}>
          <Switch>
            <Route path="/index/start/home" component={Home_left}/>
            <Route path="/index/start/registrate" component={Registrate_left}/>
            <Redirect to="/index/start/home" />
          </Switch>
        </Sider>
        <Divider type="vertical" style={{ height:'100%', margin:'0' }} />
        {/*中间部分*/}
        <Content style={{ background:'#29282c' }}>
          <Switch>
            <Route path="/index/start/home" component={Home}/>
            <Route path="/index/start/registrate" component={Registrate}/>
            <Redirect to="/index/start/home" />
          </Switch>
        </Content>
        <Divider type="vertical" style={{ height:'100%', margin:'0' }} />
        {/*右侧部分*/}
        <Sider width={350} style={{ background:'#29282c' }}>
          <Switch>
            <Route path="/index/start/home" component={Home_right}/>
            <Route path="/index/start/registrate" component={Registrate_right}/>
            <Redirect to="/index/start/home" />
          </Switch>
        </Sider>
      </Layout>
    );
  }
}

export default Start;